<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/9/16
 * Time: 10:59
 */

namespace app\common\validate;


use think\Validate;

class SysFile extends Validate
{
    protected $rule = [ // 定义验证规则
        'user_company_name|单位' => 'require',
        'loss_assessor|定损员' => 'require',
        'loss_assessor_phone|定损员电话' => 'require',
        'car_series|车系名称' => 'require',
        'vehicle_license_num|车牌号' => [
            'require',
            'regex'=>'/^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼川贵云渝藏陕甘青宁新使]{1}[A-Z]{1}[DF]{0,1}[0-9a-zA-Z]{5}[DF]{0,1}$/u'
        ],
        'repair_company_name|修理厂名称' => 'require',
        'user_name|业务经理' => 'require',
    ];

    protected $message = [ // 定义验证提示
        'vehicle_license_num.regex'=>'车牌号填写有误'
    ];

    protected $scene = [ // 定义验证场景

    ];
}